package com.pro.service.imple;

import com.pro.mapper.JsActicleCategroyMapper;
import com.pro.pojo.JsActicleCategroy;
import com.pro.service.JsActicleCategroyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class JsActicleCategroyServiceImple implements JsActicleCategroyService {
    @Autowired
    JsActicleCategroyMapper jacm;
    @Override
    public List<JsActicleCategroy> getAllJsActicleCategroy() {
        JsActicleCategroy jsActicleCategroy = new JsActicleCategroy();
        jsActicleCategroy.setActicleCategroyId(50);
        jsActicleCategroy.setArtcleCategroyName("请选择要查询的种类");
        jsActicleCategroy.setParentId(0);
        List<JsActicleCategroy> allJsActicleCategroy = jacm.getAllJsActicleCategroy();
        allJsActicleCategroy.add(jsActicleCategroy);
        return allJsActicleCategroy;
    }

    @Override
    public boolean addJsActicleCategroy(String artcleCategroyName, Integer parentId,Integer createId,String createDate) {
        return jacm.addJsActicleCategroy(artcleCategroyName,parentId,createId,createDate);
    }

    @Override
    public boolean editJsActicleCategroy(String artcleCategroyName, Integer acticleCategroyId,Integer updateId,String updateDate) {
        return jacm.editJsActicleCategroy(artcleCategroyName,acticleCategroyId,updateId,updateDate);
    }

    @Override
    public boolean deleteJsActicleCategroy(Integer acticleCategroyId) {
        return jacm.deleteJsActicleCategroy(acticleCategroyId);
    }
}
